﻿<%inherits "Discuz.Space.Pages.usercpspacemanagecategory"%>
<%template _header%>
<!--header end-->
<div id="foruminfo">
	<div id="nav">
		<a href="{config.forumurl}" class="home">{config.forumtitle}</a>  &raquo; <a href="usercp.aspx">用户中心</a>  &raquo; <strong>管理分类</strong>
	</div>
	<div id="headsearch">
		<div id="search">
			<%template _quicksearch%>
		</div>
	</div>
</div>
<!--主体-->
<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "categoryid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>
<div class="controlpannel">
   <%template _menu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _spacemenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if page_err==0%>
						<%if ispost%>
							<%template _msgbox%>
						<%else%>
				  		<form id="catelist" name="catelist" method="post" action="">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
				  		<tr>
				  			<th width="30%">分类名称</th>
							<th width="40%">分类描述</th>
							<th width="10%">分类阅读数</th>
							<th width="10%">序号</th>
							<th width="10%">&nbsp;</th>
					  </tr>
						<%loop currentcategory categorylist%>
							<tbody>
							<tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
					        <td width="30%" style="text-align:left;">
								<input name="categoryid" type="checkbox" id="categoryid{currentcategory[categoryid]}" value="{currentcategory[categoryid]}" style="margin-top:8px;"/>
								{currentcategory[title]} <a href="usercpspacecategoryedit.aspx?categoryid={currentcategory[categoryid]}">[编辑]</a>
					        </td>
							<td width="40%" style="text-align:left;">{currentcategory[shortdescription]}&nbsp;</td>
							<td width="10%" class="fontfamily">{currentcategory[categorycount]}</td>
							<td width="10%" class="fontfamily">{currentcategory[displayorder]}</td>
							<td width="10%"><a href="###" onclick="$('categoryid{currentcategory[categoryid]}').checked=true;$('catelist').submit();">删除</a></td>
							</tr>
							</tbody>
						<%/loop%>
						</table>
						</form>
						</div>
						<div class="pannelmessage">
							<div class="pannelleft" style="width: 160px;">
								<a href="javascript:;"  onclick="checkCheckBox($('catelist'),this)" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;
								<a href="###" onclick="if(confirm('您确认要将所选的分类删除吗？')) $('catelist').submit()" class="selectall">删除</a> 
							</div>
							<div class="pannelright" style="width: 70%; padding-top: 6px; padding-right: 5px;">
								<a href="usercpspacecategoryadd.aspx" class="submitbutton" style="padding-left:15px;"><strong>增加日志分类</strong></a>
							</div>
						</div>
						<div class="pages_btns">
							<div class="pages">
								<em>{pageid}/{pagecount}页</em>{pagenumbers}
								<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) {
							window.location='usercpspacemanagecategory.aspx?page=' + this.value;}"  size="4" maxlength="9"/>页</kbd>
							</div>
						</div>
						<%/if%>
					<%else%>
					<%template _usercperrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
